package com.pty.demo.behaviour.state;

/**
 * @author pengty
 * @date 2020/3/13
 */
public class ToBeDeliveredState extends OrderState {

    public ToBeDeliveredState(OrderStateContext orderStateContext) {
        super(orderStateContext);
    }

    @Override
    public void pay() {
        System.out.println("该订单已完成支付");
    }

    @Override
    public void checkPay() {
        System.out.println("该订单已完成支付");
    }

    @Override
    public void deliver() {
        System.out.println("卖家发货");
        orderStateContext.setCurrentState(new DeliveredState(orderStateContext));
    }

    @Override
    public void receive() {

    }
}
